#
# @lc app=leetcode.cn id=728 lang=python
#
# [728] 自除数
#

# @lc code=start
class Solution(object):
    def selfDividingNumbers(self, left, right):
        """
        :type left: int
        :type right: int
        :rtype: List[int]
        """
        def isnatureNum(n):
            x = n
            while x:
                x, d = divmod(x, 10)
                if d == 0 or n % d:
                    return False
            return True
        res=[n for n in range(left,right+1) if isnatureNum(n) ]
        return res
# @lc code=end

